import {orderDict} from "../../../../models/OrderStatus";

export default (self)=> [
  {
    title: '商品名称',
    name: 'name',
    searchItem: {}
  },

  {
    title: '商品类目',
    name: 'goodTypeId',
    searchItem: {
      width: 200,
      showSearch: true,
      type: 'select',
      loading: self.getAll("goodType").loading,  // 加载状态
      onDropdownVisibleChange : (visible) =>{
        if (visible){
          self.dispatch({
            type: `goodType/getAll`,
          })
        }
      },
    },
    dict: self.getAll("goodType").dict,
  },

  {
    title: '是否热门',
    name: 'isHot',
    dict: [
      { code: false, codeName: '不热门' },
      { code: true, codeName: '上热门' },
    ],
    searchItem: {
      type: 'select',
      width: 150,
    },
  },

  {
    title: '是否下架',
    name: 'soldOut',
    dict: [
      { code: false, codeName: '上架' },
      { code: true, codeName: '下架' },
    ],
    searchItem: {
      type: 'select',
      width: 150,
    },
  },
]
